<template>

  <div class="left">
  
    <el-table
      ref="multipleTable"
      :data="tableData"
      tooltip-effect="dark"
      
      @selection-change="handleSelectionChange"
    >
      <el-table-column type="selection" width="60"> </el-table-column>
      <el-table-column label="序号" prop="xh" width="60" >
      </el-table-column>
      <el-table-column prop="zh" label="组号" width="60"> </el-table-column>
      <el-table-column prop="name" label="名称" width="60">
      </el-table-column>
      <el-table-column prop="oneeat" label="单次用量" width="60">
      </el-table-column>
      <el-table-column prop="yf" label="用法" width="60">
      </el-table-column>
      <el-table-column prop="pd" label="频度" width="60">
      </el-table-column>
      <el-table-column prop="ts" label="天数" width="60">
      </el-table-column>

      <el-table-column prop="zl" label="总量" width="60">
      </el-table-column>
      <el-table-column prop="dj" label="单价" width="60">
      </el-table-column>
      <el-table-column prop="bj" label="编辑" width="60">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="danger"
            @click="handleDelete(scope.row.id)"
            >删除</el-button
          >
        </template>
      </el-table-column>
    </el-table>

    <div class="left-dd">
        <div class="add">
      <h4>附加费用</h4>
    </div>
      <el-form
        ref="form"
        :model="form"
        label-width="80px"
        style="display: flex"
      >
        <el-form-item label="科室">
          <el-select
            v-model="form.region"
            placeholder="全科"
            style="width: 80px"
          >
            <el-option label="中药"></el-option>
            <el-option label="西药"></el-option>
            <el-option label="中西结合"></el-option>
          </el-select>
        </el-form-item>

 <el-form-item label="接诊医生">
          <el-select
            v-model="form.region"
            placeholder="王朝阳"
            style="width: 100px"
          >
            <el-option label="欧阳文"></el-option>
            <el-option label="熊朝阳"></el-option>
            <el-option label="外星人"></el-option>
          </el-select>
        </el-form-item>

      </el-form>

      <span>此方共计500元，共三个处方。共计15元</span>
    </div>
  </div>
</template>
<script>
export default {
  props: ["arr"],
  data() {
    return {
      typeObj: {
        //映射对象
        0: "充值",
        1: "优惠券",
        2: "购买一定盈",
      },
      tableData: [
        {
          xh: 1,
          zh: 2,
          name: "阿莫西林",
          oneeat: "1g*1",
          yf: "口服",
          pd: "每日三次",
          ts: "七天",
          zl: "7g",
          dj: 199,
        },
      ],
      multipleSelection: [], //就是我们选择的值的数组(checkbox选中的值)
      form: {
        name: "",
        region: "",
        date1: "",
        date2: "",
        delivery: false,
        type: [],
        resource: "",
        desc: "",
      },
    };
  },
};
</script>

<style lang="less" scoped >
.left {
  background-color: white;
  border: 2px solid black;
  border-radius: 10px;
  margin-top: 20px;
}

.left-dd {
  display: flex;
  // align-items: center;
  padding-top: 10px;
}

.el-table > {
  height: 500px;
}
.add {
  background-color: greenyellow;
  color: white;
  text-align: center;
  line-height: 30px;
  width: 80px;
  height: 30px;
  border-radius: 10px;
  margin-left: 20px;
  cursor: pointer;
}
span{
  margin-left: 20px;
}


</style>